package com.commerceerp.system.mapper;


import com.commerceerp.system.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by tangyong on 2018/3/10.
 */
public interface ShopMapper extends Mapper {

    //获得wish店铺
    List<Map> wishFindList(@Param("userId") String userId);

    //wish店铺添加
    Integer insertWisth(ShopWish shopWish);

    //wish店铺编辑
    Integer updateWish(ShopWish shopWish);

    //wish店铺删除
    Integer delWish(@Param("id") String id,@Param("userId") String userId);

    //wish店铺删除
    Integer delWishByClientId(@Param("clientId") String clientId);

    //wish店铺token绑定
    Integer updWishToken(ShopWish shopWish);

    //根据clientId获取wish门店
    ShopWish getShopWishByClientId(@Param("clientId") String clientId);

    //根据id获取wish门店
    ShopWish getShopWishById(@Param("id") String id);

    //获得所有wish门店
    List<ShopWish> getShopWish(@Param("userId") String userId);

    //Amazon店铺
    List<Map> amazonFindList(@Param("userId") String userId);

    //Amazon店铺添加
    Integer insertAmazon(ShopAmazon shopAmazon);

    //Amazon店铺删除
    Integer updateAmazon(ShopAmazon shopAmazon);

    //Amazon店铺删除
    Integer delAmazon(@Param("id") String id,@Param("userId") String userId);

    //Amazon端点
    List<Map> amazonEndpoint();

    //获得客服消息
    SysTicket getSysTicket(@Param("id")String id);

    //删除回复的信息
    Integer delTicketReply(@Param("id") String id);

    //添加客服消息
    Integer saveSysTicket(SysTicket sysTicket);

    //添加客服回复消息
    Integer saveSysTicketReply(SysTicketReply sysTicketReply);

    //客服信息关闭
    Integer wishClose(SysTicket sysTicket);

    //保存ebay店铺
    Integer insertEbay(ShopEbay shopEbay);

    //获得ebay店铺
    ShopEbay getShopEbayBySessionId(@Param("sessionId") String sessionID);

    Integer updateEbay(ShopEbay shopEbay);

    //获得ebay店铺
    List<ShopEbay> getShopEbayById(@Param("id") String id,@Param("userId") String userId);

    //ebay店铺删除
    int delEbay(@Param("id") String id,@Param("userId") String userId);

    List<ShopAmazon> getShopAmazons(@Param("userId")String userId);

    //检查店铺是否存在
    ShopAmazon getShopAmazon(ShopAmazon shopAmazon);

    Map getAmazonEndpoint(@Param("id") String id);

    //获取汇率
    List<Huilv> getHuilvs();

    //修改汇率
    void updHuilv(Huilv huilv);

    //兑换成美元
    String getMoneyUSD(@Param("money") String money,@Param("code") String code);

    ShopEbay getShopEbay(@Param("id") String id);
}
